#include "helpdialog.h"
#include "ui_helpdialog.h"

helpDialog::helpDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::helpDialog)
{
    ui->setupUi(this);


    const QString html = QCoreApplication::translate(
            "HelpDialog",
            "<p align=\"center\"><font size=\"+2\"><b>听小方游戏数据生成器</b></font><br><i>Version %1</i></p>\n"            
            "<p align=\"center\">第一步：设置输入文本文件所在的路径.</p>\n"
            "<p align=\"center\">第二步：设置生成的游戏文件所在的路径.</p>\n"
            "<p align=\"center\">第三步：选中一个文本文件点击生成.</p>\n"
            "<p align=\"center\">第四步：点击打开路径按钮查看游戏数据.</p>\n")
            .arg(QApplication::applicationVersion());

    ui->help->setHtml(html);
}

helpDialog::~helpDialog()
{
    delete ui;
}

void helpDialog::on_pushButton_clicked()
{
    this->close();
}
